from django.db import models
from django.contrib.auth.models import User
# Create your models here.

class Profile(models.Model):
    name_cn = models.CharField(max_length=10,verbose_name='中文名称')
    wechat = models.CharField(max_length=11,verbose_name='微信号')
    phone = models.CharField(max_length=11,verbose_name='手机号')
    info = models.TextField(verbose_name='备注信息')
    # 一对一关联 和默认用户表建立关系
    profile = models.OneToOneField(User)
    class Meta:
        default_permissions = []
        permissions = (
            ('add_user','添加用户'),
            ('show_user','查看用户'),
            ('update_user','修改用户'),
            ('delete_user','删除用户'),
            ('user_set_perm','设置用户权限')
        )
